﻿<script type="text/javascript">
    $(document).ready(function () {
        $("#MenuNews").removeClass("dropdown").addClass("active");
    });
</script>
@model IEnumerable<DatNuocViet.Models.GetNewsTypeResult>
@{
    ViewBag.Title = "Dat Nuoc Viet";
}
<div class="contenttitle">
    <div class="titleplace">
        <span>Danh mục tin</span>&nbsp;&nbsp;&nbsp;
        @if (ViewBag.message != null)
        {
            <span style="font-weight:600;color:Red;">@ViewBag.message</span>
        }
    </div>
    <div class="buttonplace">
        <a href="@Url.Action("CreateNewsType", "AdminNews")">
            <input type="button" value="Thêm danh mục tin" />
        </a>
    </div>
    <div class="clear">&nbsp;</div>
</div>
<div class="contentitem">
    <table class="tablecontent">
        <thead>
            <tr>
                <th style="width:50px;">
                    &nbsp;
                </th>
                <th>
                    Loại tin
                </th>
                <th style="width:120px;text-align:center;">
                    Thứ tự sắp xếp
                </th>
                <th style="width:70px">
                    &nbsp;
                </th>
            </tr>            
        </thead>
        <tbody id="tablecontent">
            @{int i = 0;}
            @foreach (var item in Model)
            {
                i++;
                <tr class="@(i%2==0?"event":"odd")">
                    <td>
                        @i
                    </td>
                    <td>
                        @item.NewsTypeVn
                    </td>
                    <td style="text-align:center;">
                        @item.SortOrder
                    </td>
                    <td>
                        @Html.ActionLink("Chỉnh sửa", "EditNewsType", new { id = item.Id })
                    </td>
                </tr>
            }
        </tbody>
    </table>    
</div>
